import request from '@/utils/request'
import type { TrendsType, TrendsListResult } from './types'

/** 订单接口 */
class APIDynamic {
    /** 获取动态列表 */
    static getTrends(params: PageQuery, type: TrendsType) {
        return request<any, ResponseData<TrendsListResult[]>>({
            url: '/getTrends',
            method: 'POST',
            data: { type },
            params
        })
    }

    /** 获取关注列表 */
    static getUserConcern(params: PageQuery) {
        return request<any, ResponseData<TrendsListResult[]>>({
            url: '/getUserConcern',
            method: 'POST',
            params
        })
    }

    /** 取消关注店铺 */
    static cancelUserConcern(Invite_code: string) {
        return request<any, ResponseData>({
            url: '/cancelUserConcern',
            method: 'POST',
            data: { Invite_code }
        })
    }

}

export default APIDynamic
